App.require(function () {
    var app = App.getCurrent();
    app.defineComponent("header-btns", {
        getDomObj: function () {
            this.attachDom("#header-btns", "btnGroup")
                .attachEvent("btnGroup", "btnclick", this.btnGroupClickHandler, false)
        },
        btnGroupClickHandler: function (ev) {
            this.dispatchCustomEvent("headerbtnclick", {
                component: this, btnComponent: ev.detail.component
            });
        },
        render: function (next) {
            this.fetch("./index.html", function (text) {
                next(this.renderHTML(text));
            })
        },
    });
})